package com.ehotting.edsta.circuitDesign.enums;

/**
 * 模拟信号：采集信号类型
 */
public enum   AnalogueTypeEnum {

    Voltage("1","电压"),
    Current("2","电流"),
    Acceleration("3","加速度"),
    Temperature("4","温度"),
    Humidity("5","湿度"),
    Pressure("6","气压"),
    Vibrate("7","振动");

    private String value;
    private String name;
    
    AnalogueTypeEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static boolean isNeedSensor(String value){
        boolean isExistEnum = false;
        for(AnalogueTypeEnum analogueType : AnalogueTypeEnum.values()){
            if(analogueType.getValue().equals(value)){
                isExistEnum = true;
            }
        }
        return  isExistEnum &&  !AnalogueTypeEnum.Voltage.getValue().equals(value);
    }
}
